/**
 * 
 */
package base.jdk;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;


/**
 * @author bliu
 *
 */
public class WoRi {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yy",  Locale.ENGLISH);
		Date transactionDate = null ;
		try {
			transactionDate = dateFormat.parse("13-APR-13");
		} catch (ParseException e) {
			System.err.println(e);
		}
		Calendar tempCalendar = Calendar.getInstance();
		tempCalendar.setTime(transactionDate);
		System.out.println(String.format("%1$tY-%1$tm-%1$td", tempCalendar));

	}

}
